chore: sync metaschema-schema from constructive-db#44
Merged
pyramation merged 2 commits intomainfrom Mar 1, 2026
Merged
Conversation
Syncs all changes from constructive-db/pgpm-modules/metaschema-schema: - Add default_privilege table (new) - Add is_grant to table_grant and view_grant - Rename role_name to grantee_name across grant/policy tables - Remove dead procedure, limit_function, and rls_function tables - Update combined SQL and pgpm.plan - Various field/table updates (smart_tags, module, scope columns)
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
chore: sync metaschema-schema from constructive-db
Summary
Bulk sync of
packages/metaschema-schemafrom the canonical copy inconstructive-io/constructive-db/pgpm-modules/metaschema-schema. This repo had fallen significantly behind. Key changes:Dead table removal:
procedure,limit_function, andrls_functiontables (deploy, revert, verify, combined SQL, pgpm.plan)New table:
default_privilegefor declarativeALTER DEFAULT PRIVILEGES(grant/revoke on tables, functions, sequences)Column renames (breaking):
role_name→grantee_nameinpolicy,table_grant,view_granttemplate→policy_typeinpolicyNew columns:
is_grantboolean ontable_grantandview_grant(enables revoke records)smart_tags,category,module,scope,tagsadded toindex,trigger,check_constraint,foreign_key_constraint,primary_key_constraint,unique_constraint,fieldOther schema changes:
databasetable: removedschema_nameandprivate_schema_namecolumnstableunique constraint widened to(database_id, schema_id, name)(was(database_id, name))field.categorytype changed fromfield_categorytoobject_category;field_categoryenum removedobject_categoryenum now includesmoduleandappvaluesdatabases_table_unique_name_idxnow includesschema_idUpdates since last revision
metaschema-modulesandservicespackages to reflect schema changes:services.test.ts.snap: removedschema_nameandprivate_schema_namefrom database snapshot (columns were dropped)modules.test.ts.snap: updated constraint counts (72600→67416, 102535→96840) due to dead table removal; re-sortedsessions_modulesnapshot block (content unchanged, just ordering)Review & Testing Checklist for Human
rls_functiondeletion is intentional — the conversation only explicitly mentionedprocedureandlimit_functionas dead code. Confirmrls_functionis also dead in constructive-db (it appears to have been removed there previously, but worth double-checking).role_name→grantee_nameandtemplate→policy_typeare breaking changes. Check that no other packages in this repo or downstream consumers reference the old column names.field_categorytype removal — confirm no downstream code in pgpm-modules or consumers referencesmetaschema_public.field_categorydirectly.metaschema-schema--0.15.5.sql) is consistent with the individual deploy files — this was synced as a whole file from constructive-db, not regenerated locally.Notes
deploy/,revert/,verify/,pgpm.plan, andsql/metaschema-schema--0.15.5.sqlfrom constructive-db.